package com.vhall.component.entity.rbac.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author dalong
 * @date 2021-05-14 14:26
 */
@Data
public class MenuEditReqVO implements Serializable {

    private static final long serialVersionUID = -6407270506908474500L;
    @NotNull(message = "menuId不能为空")
    @ParamName(value = "menu_id")
    private Integer menuId;

    @NotBlank(message = "name不能为空")
    @ParamName(value = "name")
    private String name;

    @NotBlank(message = "url不能为空")
    @ParamName(value = "url")
    private String url;

    @NotBlank(message = "pid不能为空")
    @ParamName(value = "pid")
    @Pattern(regexp = "^[0-9]+[0-9]*$", message = "pid必须为>=0的正整数")
    private String pid;

    private Byte sort;

    private String token;
    @ParamName(value = "type")
    private Byte type;
    @ParamName(value = "status")
    private Byte status;
}
